home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / LIFER__ / PROTO / P / PIMENU_L.C < prev    next >
Text File  |  1991-07-23  |  2KB  |  49 lines

  1. /*  PIMenu_Life                                                              Initialize the menu bar */
  2.  
  3. /* Unit name:  PIMenu_Life.c   */
  4. /* Function:  This module loads in the menu lists and places them */
  5. /*      into the menubar. */
  6. /* History: 7/23/91 Original by Prototyper 3.0   */
  7.  
  8.  
  9. #include "PCommonLife.h"    /* Common */
  10. #include "Common_Life.h"    /* Common */
  11. #include "PUtils_Life.h"    /* General Utilities */
  12. #include "Utils_Life.h"    /* General Utilities */
  13.  
  14. #include "InitMenuLife.h"    /* Extra menu init */
  15.  
  16. #include "PIMenu_Life.h"    /* This file*/
  17.  
  18.  
  19. /* ======================================================= */
  20.  
  21. /* Routine: Init_My_Menus */
  22. /* Purpose: Load in the menu lists and initialize the menubar */
  23.  
  24. void Init_My_Menus()
  25. {
  26.  
  27.  
  28.  
  29.         ClearMenuBar();                                                      /* Clear any old menu bars */
  30.  
  31.         /*  This menu is the APPLE menu, used for About and desk accessories. */
  32.         Menu_Apple = GetMenu(Res_Menu_Apple);                       /* Get the menu from the resource file */
  33.         InsertMenu (Menu_Apple,0);                                        /* Insert this menu into the menu bar */
  34.         AddResMenu(Menu_Apple,'DRVR');                                 /* Add in DAs */
  35.  
  36.         Menu_File = GetMenu(Res_Menu_File);                            /* Get the menu from the resource file */
  37.         InsertMenu (Menu_File,0);                                          /* Insert this menu into the menu bar */
  38.  
  39.         Menu_Edit = GetMenu(Res_Menu_Edit);                            /* Get the menu from the resource file */
  40.         InsertMenu (Menu_Edit,0);                                          /* Insert this menu into the menu bar */
  41.  
  42.  
  43.         AddExtraMenus();                                                     /* Add any extra menu lists */
  44.  
  45.         DrawMenuBar();                                                      /* Draw the menu bar */
  46.  
  47. }                                                                                /* End of procedure Init_My_Menus */
  48.  
  49.